<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>忘记密码</title>
  <link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="jumbotron text-center" style="margin-bottom: 2px">
  <c:choose>
    <c:when test="${(user.name != null) && (user.isAdmin == false)}">
      <h3>你好，尊敬的用户：${user.name}！欢迎回来！</h3>
    </c:when>
    <c:when test="${(user.name != null) && (user.isAdmin == true)}">
      <h3>你好，尊敬的管理员：${user.name}！欢迎回来！</h3>
    </c:when>
    <c:otherwise>
      <h3>你好，亲爱的游客！欢迎回来！</h3>
    </c:otherwise>
  </c:choose>
  <h3>本网站用于用户之间进行音乐的分享交流，感谢大家的支持！</h3>
</div>
<div class="container-fluid">
  <div class="row">
    <div class="col-3" style="padding-right: 1px">
      <nav class="navbar-nav bg-light navbar-light">
        <ul class="navbar-nav">
          <c:if test="${user == null}">
            <li class="nav-item">
              <a class="nav-link" href="client_jsp/login.jsp">登录</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="client_jsp/register.jsp">注册</a>
            </li>
          </c:if>

          <li class="nav-item">
            <a class="nav-link" href="../index.jsp">音乐馆</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="musiclist_liked.jsp">我喜欢</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="musiclist.jsp">歌单</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="friend.jsp">我的好友</a>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
              个人中心
            </a>
            <div class="dropdown-menu">
              <a class="dropdown-item" href="personal_detail.jsp">个人信息</a>
              <a class="dropdown-item" href="change_password.jsp">修改密码</a>
              <a class="dropdown-item" href="LogoutController">注销</a>
            </div>
          </li>
          <c:if test="${user.isAdmin == true}">
            <li class="nav-item">
              <a class="nav-link" href="static/admin_html/index.html">网站管理</a>
            </li>
          </c:if>
        </ul>
      </nav>

    </div>
    <div class="col-7" style="padding-left: 1px">
      <div class="text-center" style="margin: 50px">
        <form class="form-login" action="LoginController" method="post">

          <h3 class="text-center">忘记密码</h3>
          <div class="form-group">
            <label for="id_oldPassword">用户名：</label>
            <input type="text" name="oldPassword" class="form-control" id="id_oldPassword" placeholder="oldPassword" value="${form.name}" autofocus required>
            <span>${form.errors.name} ${DBMes}</span>
          </div>
          <div class="form-group">
            <label for="id_newPassword">用户注册邮箱：</label>
            <input type="password" name='newPassword' class="form-control" id="id_newPassword" placeholder="newPassword" required>
            <span>${form.errors.password} ${PSWDMes}</span>
          </div>
          <div>
            <button type="submit" class="btn btn-primary float-right">确认提交</button>
          </div>
        </form>
      </div>
    </div>
    <div class="col-2">
      <p>公告</p>
    </div>
  </div>
</div>
<div class="jumbotron text-center" style="margin-bottom: 0">
  <h3>底部内容</h3>
</div>

<script src="../static/bootstrap/js/jquery-3.4.1.min.js"></script>
<script src="../static/bootstrap/js/popper.min.js"></script>
<script src="../static/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
